package svc

import (
	"blog/api/internal/config"
	"blog/blogrpc/blogrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	BlogRoC blogrpcclient.Blogrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		BlogRoC: blogrpcclient.NewBlogrpc(zrpc.MustNewClient(c.BlogRoC)),
	}
}
